🕒

Upcoming Feature
This page is about an upcoming feature. It can be previewed in a developer version. It is possible that the behaviour may change in the future. For more information, see Snap! 10.0.

encode blocks () to text () pretty is a reporter block and is found in the Code to Blocks to Code library. It converts blocks to Lisp code. The Boolean to the right, if true, creates new lines but if false, clusters the code into a single line.

(encode blocks (() @addInput) to text <> pretty :: operators)

Examples

ScriptCode
move (10) steps(move 10)
([sqrt V] of (10))(fn [sqrt] 10)
say (timer)
(say
    (timer)
)
for ((i)) = (1) to (10) {
  stamp
}
(for i 1 10
    stamp
)
a custom block :: other("a custom block")
a custom block [with] [inputs] :: motion("a custom block _ _" with inputs)